/**
 * com.future CO.,ltd.
 */

package com.future.springcloud.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 类说明：
 */

@Component
@FeignClient(value = "CLOUD-PROVIDER-HYSTRIX-SERVICE")
public interface PaymentHystrixService {

	/**
	 * 正常场景
	 *
	 * @param id
	 * @return
	 */
	@GetMapping(value = "/payment/hystrix/ok/{id}")
	@ResponseBody
	public String paymentInfoOK(@PathVariable("id") Integer id);

	/**
	 * 异常场景
	 *
	 * @param id
	 * @return
	 */
	@GetMapping(value = "/payment/hystrix/timeout/{id}")
	@ResponseBody
	public String paymentInfoTimeOut(@PathVariable("id") Integer id);
}
